package com.sg.dto.base.app.common;


import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;


/**
 * @desc CycleTypeDto
 * @使用场景
 */
@Data
public class CycleTypeDto extends BaseDto implements Serializable {

    /**
     * 周期类型标识:
     */
    @ApiModelProperty("周期类型标识")
    private String cycleTypeCode;

    /**
     * 周期类型ID:
     */
    @ApiModelProperty("周期类型ID")
    private String cycleTypeId;
    /**
     * 排序:
     */
    @ApiModelProperty("排序")
    private Long orderNumber;
    /**
     * 周期类型名称:
     */
    @ApiModelProperty("周期类型名称")
    private String cycleTypeName;
    /**
     * 主体生命周期:
     */
    @ApiModelProperty("主体生命周期")
    private String subjectLifeCycle;
    /**
     * 操作人就职记录ID:
     */
    @ApiModelProperty("操作人就职记录ID")
    private String operationInductionId;
    /**
     * 操作时间:
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;
    /**
     * 是否存档
     */
    @ApiModelProperty("是否存档")
    private String isArchive;
    /**
     * 周期类型
     */
    @NotNull(message = "周期类型不能为空")
    @ApiModelProperty("周期类型")
    private String cycleType;
    /**
     * 是否末级周期 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否末级周期")
    private String isLastCycle;

    /**
     * 周期类型配置标识
     */
    @ApiModelProperty("周期类型配置标识")
    private String cycleTypeConfCode;

    /**
     * 最近可循环周期类型编码
     */
    @ApiModelProperty("最近可循环周期类型编码")
    private String nextCyclePeriod;
    /**
     * 自定义字段
     */
    @ApiModelProperty("周期类型标识")
    private String customField;

    /**
     * 自定义字段1
     */
    @ApiModelProperty("周期类型排序")
    private String customField1;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        CycleTypeDto that = (CycleTypeDto) o;
        return cycleTypeCode == that.cycleTypeCode && cycleTypeId == that.cycleTypeId && orderNumber == that.orderNumber && cycleTypeName == that.cycleTypeName && subjectLifeCycle == that.subjectLifeCycle && operationInductionId == that.operationInductionId && operateTime == that.operateTime && isArchive == that.isArchive && cycleType == that.cycleType && isLastCycle == that.isLastCycle && cycleTypeConfCode == that.cycleTypeConfCode && nextCyclePeriod == that.nextCyclePeriod && customField == that.customField && customField1 == that.customField1;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), cycleTypeCode, cycleTypeId, orderNumber, cycleTypeName, subjectLifeCycle, operationInductionId, operateTime, isArchive, cycleType, isLastCycle, cycleTypeConfCode, nextCyclePeriod, customField, customField1);
    }

}
